"""将用户输入的内容持久化到文件中"""

input_text = input('请输入一些文本内容以保存到文件中:\n')
file_path = r'./target.txt'

with open(file_path, 'w', encoding='utf-8') as file:
    file.write(input_text)

print(f'文件已经写入到{file_path}')
